import config from "@/config"
import http from "@/utils/request"

export default {
	list: {
		url: `${config.API_URL}/procedure/list`,
		get: async function(data,  config={}){
			return await http.get(this.url, data,  config);
		}
	},
	getAll: {
		url: `${config.API_URL}/procedure/getAll`,
		get: async function(data,  config={}){
			return await http.get(this.url, data,  config);
		}
	},
	add: {
		url: `${config.API_URL}/procedure/add`,
		post: async function(data) {
			return await http.post(this.url, data);
		}
	},
	edit: {
		url: `${config.API_URL}/procedure/edit`,
		post: async function(data) {
			return await http.post(this.url, data);
		}
	},
	tmp: {
		url: `${config.API_URL}/procedure/tmp/get`,
		get: async function(data,  config={}){
			return await http.get(this.url, data,  config);
		}
	},
	save: {
		url: `${config.API_URL}/procedure/save`,
		post: async function(data) {
			return await http.post(this.url, data);
		}
	},
	addPrintData: {
		url: `${config.API_URL}/procedure/print/data`,
		post: async function(data) {
			return await http.post(this.url, data);
		}
	},
	findPrint: {
		url: `${config.API_URL}/procedure/print/find`,
		get: async function(data,  config={}){
			return await http.get(this.url, data,  config);
		}
	},
	getPrintData: {
		url: `${config.API_URL}/procedure/print/get`,
		get: async function(data,  config={}){
			return await http.get(this.url, data,  config);
		}
	},
	getPatchDetail: {
		url: `${config.API_URL}/procedure/patch/detail`,
		get: async function(data,  config={}){
			return await http.get(this.url, data,  config);
		}
	},
	getStaffByProcess: {
		url: `${config.API_URL}/procedure/process/staff`,
		get: async function(data,  config={}){
			return await http.get(this.url, data,  config);
		}
	},
	setSalaryByPatch: {
		url: `${config.API_URL}/procedure/process/staff/set`,
		post: async function(data) {
			return await http.post(this.url, data);
		}
	},
	handEnd: {
		url: `${config.API_URL}/procedure/patch/end`,
		post: async function(data) {
			return await http.post(this.url, data);
		},
		name: '手动完结'
	}
}